<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>员工列表</title>
           <script type="text/javascript">
           
           function toadd() {
	       document.forms[0].action="/bsc/bis_shop_user/toadd";
	       document.forms[0].submit();
           }
           </script>
        
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="../static/common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="../static/common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="../static/common/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="../static/css/personal.css" media="all">
	<style type="text/css">
		.c1{
			width: 137px;
			text-align: center;
		}
		.w1{
			margin-top: 10px;
		}
		.s1{
			margin-left: 1cm;
		}
	</style>
</head>

<body>
<section class="layui-larry-box">
			<div class="larry-personal">
				<div class="layui-tab">
			    <form method="post" action="/bsc/bis_shop_user/list">
						 <div class="layui-inline">
							<div class="layui-input-inline">
							员工账号:<input type="text" name="qaccount" placeholder="请输入关键字" class="c1">
				                              店铺名称:<select name="qshop_id" class="c1" calss="s1">
				                   <option value="-1" >-请选择-</option>
				                   <c:forEach items="${listbis_shop }" var="bis_shop">
				                   <option value="${bis_shop.shop_id}">${bis_shop.shop_name}</option>
				                   </c:forEach> 
				                   </select>
				                               职位:<select name="qpost_code" class="c1" calss="s1">
				                   <option value="-1">-请选择-</option>
				                   <c:forEach items="${listbis_shop_post }" var="bis_shop_post">
				                   <option value="${bis_shop_post.post_code}">${bis_shop_post.post_name}</option>
				                   </c:forEach> 
				                 </select>
				                               状&nbsp;&nbsp;态:<select name="qstatus" class="c1" calss="s1">
				                   <option value="-1">-请选择-</option>
				                   <option value="0">离职</option>
				                   <option value="1">在职</option>
				                 </select><br>
							 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;姓名:<input class="w1" type="text" name="qusername">
				             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;工号:<input class="w1"  calss="s1"type="text" name="qwork_number">
				                              手机:<input class="w1" type="text" name="qmobile" calss="s1">
				                              身份证:<input class="w1" type="text" name="qidno" calss="s1">
								
							</div>
							 <input type="submit" value="查询" class="layui-btn layui-btn-normal">
				             <button type="reset" value="" class="layui-btn layui-btn-normal">重置</button>
							
						</div> 
						
						<div class="layui-inline">
							<a class="layui-btn layui-btn-normal newsAdd_btn">新增员工</a>
						</div>
						
						<div class="layui-inline">
						</div>
						
   

					<!-- 操作日志 -->
						<table class="layui-table">
							<colgroup>
								<col width="9%">
								<col width="12%">
								<col width="12%">
								<col width="9%">
								<col width="8%">
								<col width="8%">
								<col width="8%">
								<col width="15%">
								<col width="15%">
								<col width="15%">
								<col width="15%">
								<col width="8%">
								<col width="8%">
								<col width="10%">
							</colgroup>
					<thead>
						<tr>
							<th >编号</th>
							<th>员工账号</th>
							<th>姓名</th>
							<th>性别</th>
							<th>工号</th>
							<th>店铺名称</th>
							<th>职位</th>
							<th>手机</th>
							<th>身份证</th>
							<th>销售收入</th>
							<th>手工收入</th>
							<th>状态</th>
							<th>入职时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody class="news_content">
					<c:forEach items="${listbis_shop_user }" var="bis_shop_user" varStatus="stat">
                         <tr>

                              <td>${stat.index+1 }</td> 

                              <td>${bis_shop_user.account }</td> 

                              <td>${bis_shop_user.username }</td> 

                              <td>
                              <c:if test="${bis_shop_user.sex=='2' }">女</c:if>
                              <c:if test="${bis_shop_user.sex=='1' }">男</c:if>
                              </td> 

                              <td>${bis_shop_user.work_number }</td> 

                              <td>${bis_shop_user.bis_Shopshop_id.shop_name }</td> 

                              <td>${bis_shop_user.bis_shop_postpost_code.post_name }</td> 

                              <td>${bis_shop_user.mobile}</td> 

                              <td>${bis_shop_user.idno }</td> 

                              <td></td> 
                              <td></td> 

                              <td>
                              <c:if test="${bis_shop_user.status =='0'}">离职</c:if>
                              <c:if test="${bis_shop_user.status =='1'}">在职</c:if>
                              </td> 

                              <td> 
                              <fmt:formatDate value="${bis_shop_user.entry_date }" pattern="yyyy-MM-dd"/>
                              </td> 
                              
                              <td>
								<a class="layui-btn layui-btn-mini news_edit" href="/bsc/bis_shop_user/init/${bis_shop_user.shop_user_id }"><i class="iconfont icon-edit"></i> 编辑</a>
								<!-- <a class="layui-btn layui-btn-normal layui-btn-mini news_collect"><i class="layui-icon"></i> 收藏</a> -->
								<a class="layui-btn layui-btn-danger layui-btn-mini news_del" data-id="1" href="/bsc/bis_shop_user/delete/${bis_shop_user.shop_user_id}"><i class="layui-icon"></i> 删除</a>
							</td>

                     </tr>
               </c:forEach>
					
					</tbody>
					</table>
		
       </form>		
                      <div class="larry-table-page clearfix">
				          <div id="page" class="page"></div>
			         </div>
		</div>
	 </div>       
</section>
<script type="text/javascript" src="../static/common/layui/layui.js"></script>
<!-- <script type="text/javascript" src="../static/js/newslist.js"></script> -->
<script type="text/javascript" src="../static/js/jquery.min.js"></script>

<script type="text/javascript">

	 layui.use(['jquery','layer','element','laypage'],function(){
	      window.jQuery = window.$ = layui.jquery;
	      window.layer = layui.layer;
          var element = layui.element(),
              laypage = layui.laypage;
          laypage({
					cont: 'page',
					pages: ${pbz.total} ,//总页数
					groups: 3 ,//连续显示分页数
					curr: ${pbz.current} ,
					jump: function(obj, first) {
						//得到了当前页，用于向服务端请求对应数据
						var curr = obj.curr;
						if(!first) {
							//layer.msg('第 '+ obj.curr +' 页');
							document.forms[0].action="/bsc/bis_shop_user/list?curr="+curr;
							document.forms[0].submit();
						}
					}
				});
         
          //添加文章
  		//改变窗口大小时，重置弹窗的高度，防止超出可视区域（如F12调出debug的操作）
  		$(window).one("resize",function(){
  			$(".newsAdd_btn").click(function(){
  				var index = layui.layer.open({
  					title : "新增员工",
  					type : 2,
  					content : "/bsc/bis_shop_user/toadd",
  					success : function(layero, index){
  						setTimeout(function(){
  							layui.layer.tips('点击此处返回文章列表', '.layui-layer-setwin .layui-layer-close', {
  								tips: 3
  							});
  						},500)
  					}
  				})			
  				layui.layer.full(index);
  			})
  		}).resize();
    });
</script>
</body>
</html>